package com.bruce.pattern.behavioral.visitor.demo2;

import lombok.extern.slf4j.Slf4j;

/**
 * Created by bruce on 2018/11/11 19:55
 */
@Slf4j
public class Visitor implements IVisitor {

    @Override
    public void visit(CodingCourse codingCourse) {
        log.info(codingCourse.getName() + " " + codingCourse.getPrice());
    }

    @Override
    public void visit(FreeCourse freeCourse) {
        log.info(freeCourse.getName());
    }
}
